import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router);
import Login from '@/components/login'
import BussModel from '@/components/buss_model'
import UserModel from '@/components/user_model'
import Index from '@/components/index'
import BussStatus from '@/components/buss_status'
import ActivityDetail from '@/components/activity'
import WelfareTask from '@/components/welfare_task'
import myStore from '@/components/myStore'
import UserGroup from '@/components/user_group'


import UserList from '@/components/user_list'
import UserBussList from '@/components/user_bussList'
import UserManage from '@/components/user_manage'
import UserBlack from '@/components/user_black'
import UserTao from '@/components/user_taobao'
import Settings from '@/components/settings'

export default new Router({
  routes: [
       {
	     	path: '/',
	      name: 'Login',
	      component:Login,
	      },
				{
	     	path: '/Login',
	      name: 'Login',
	      component:Login,
	      },
				{
	     	path: '/BussModel',
	      name: 'BussModel',
	      component:BussModel,
	      children:[
	         {
			      path: '/',
			      name: 'Index',
			      component:Index 
			     },{
			      path: '/Index',
			      name: 'Index',
			      component:Index 
			     },{
			      path: '/WelfareTask',
			      name: 'WelfareTask',
			      component:WelfareTask 
			     },{
			      path: '/myStore',
			      name: 'myStore',
			      component:myStore 
			     },{
			      path: '/BussStatus',
			      name: 'BussStatus',
			      component:BussStatus 
			     },{
			      path: '/UserGroup',
			      name: 'UserGroup',
			      component:UserGroup 
			     },{
			    	path: '/ActivityDetail',
			      name: 'ActivityDetail',
			      component:ActivityDetail 
			     }
      	]},
				{
	     	path: '/UserModel',
	      name: 'UserModel',
	      component:UserModel,
	      children:[
	      	{
			      path: '/',
			      name: 'UserBussList',
			      component:UserBussList 
			     },{
			      path: '/UserBussList',
			      name: 'UserBussList',
			      component:UserBussList 
			     },{
			      path: '/UserList',
			      name: 'UserList',
			      component:UserList 
			     },{
			      path: '/UserManage',
			      name: 'UserManage',
			      component:UserManage 
			     },{
			      path: '/UserBlack',
			      name: 'UserBlack',
			      component:UserBlack 
			     },{
			      path: '/UserTao',
			      name: 'UserTao',
			      component:UserTao 
			     },{
			      path: '/Settings',
			      name: 'Settings',
			      component:Settings 
			     }
	      ]}
  ]
})

const router = Router.routes;
Vue.prototype.$goRoute = function (index) {
  this.$router.push(index)
};
Vue.config.productionTip = false;
